<template>
	<el-table :data="content"  v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.4)" border style="width: 100%">
		<el-table-column fixed prop="id" label="ID" width="60" align="center">
		</el-table-column>
		<el-table-column prop="order_number" label="订单编号" width="200" align="center">
		</el-table-column>
		<el-table-column prop="status_name" label="订单状态" width="120" align="center">
		</el-table-column>
		<el-table-column  prop="create_time" label="下单时间" width="160" align="center">
		</el-table-column>
		<el-table-column  prop="deliver_time" label="发货时间" width="160" align="center" :formatter="deliverTime">
		</el-table-column>
		<el-table-column prop="consignee" label="联系人" width="120" align="center">
		</el-table-column>
		<el-table-column label="图片" width="120" align="center">
			<template slot-scope="scope">
				<img :src="scope.row.goods_pic" width="50" height="50" class="head_pic" />
			</template>
		</el-table-column>
		<el-table-column prop="goods_price" label="总额(元)" width="80" align="center" :formatter="editMoney">
		</el-table-column>
		<el-table-column prop="address" label="收货地址" width="340" >
		</el-table-column>
		<el-table-column fixed="right" label="操作" width="100" align="center">
			<template slot-scope="scope">
				<el-button @click="handleMove(scope.row)" type="text" size="small">查看</el-button>
				<!--<el-button type="text" size="small" @click="number()">删除</el-button>-->
			</template>
		</el-table-column>
	</el-table>

</template>

<script>
	export default {
		data(){
			return {
				msg: '',
			}
		},
		props: ['content',"loading"],
		//查看
		methods: {
			handleMove(row) {
				//this.msg=row;
				this.$router.push({
					path: '/order-detail',
					name: 'order-detail',
					params: { row: row }
				})
				
			},
			//订单总额
			deliverTime: function(row, column) {
				return row.deliver_time=="0000-00-00 00:00:00"? "-- --" : row.deliver_time
			},
			editMoney:function(row, column){
				return row.goods_price/100
			}
		},
		

	}
</script>

<style>

</style>